<?php
header ( 'Content-Type: text/html; charset=UTF-8' );

session_start ();
require_once "class/ConexionFactory.php";
require_once "class/Publicidad.php";
require_once 'class/Galeria.php';
$conexion = ConexionFactory::getConexion ();

$publicidad = Publicidad::getPublicidad ();
$galeria = Galeria::getGaleriaRandom ( 12 );

?>
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<style type="text/css">
@import url(stylesheets/dark/styles.css);

@import url(sliders/anything-slider/anything-slider.css);
</style>

<title>P&P Chile | Home</title>

<!-- Initialise jQuery Library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/cufon/cufon-yui.js"></script>
<script type="text/javascript" src="sliders/anything-slider/flashobject.js"></script>
<script type="text/javascript" src="js/views/shared/utils.js"></script>
<script type="text/javascript" src="js/views/index.js"></script>
</head>
<body id="main">
<?php
$currentPage = 'Home';
include 'header.php';
?>
<!-- Begin Header -->
	<div class="header_full sample_01">
		<div class="head_top_shadow"></div>
		<div class="head_bot_shadow"></div>
		<div id="header">
			<div class="SliderBg">
				<!-- Begin Slider -->
				<ul id="anything">
			<?php
			$ciclo = 0;
			foreach ( $publicidad as $item ) {
				$ciclo ++;
				?>
				<li>
						<div class="textSlide">
							<div class="<?php echo $ciclo%2==0? 'slide_pic_left': 'slide_pic_right'?>">
								<img src="admin/<?php echo $item->Imagen?>" width="640" height="360" alt="" />
							</div>
							<div class="txt_slide_right">
								<h2><?php echo $item->Titulo?></h2>
								<p><?php echo $item->Descripcion?></p>
								<!--<a href="#" class="btn alignleft" title="read more">read more</a> -->
								<div class="clear"></div>
							</div>
							<div class="clear"></div>
						</div>
					</li> 
					<?php } ?>
				</ul>
				<!-- End Slider -->
			</div>
		</div>
	</div>
	<!-- End Header -->
	<!-- Start Content Wrapper -->
	<div class="content_wrapper">
		<!-- Content Area -->
		<div id="content">
			<div class="columns">
				<div class="column">
					<h2 class="icon web">Works Everywhere</h2>
					<p>
						Donec accumsan malesuada orcidonec sitmet<br>eros lorem isum dolor amet incon. Adipiscing elit maurise pharetra magna accumsan. Malesuada orcdonec umet lorem doloronsec.
					</p>
					<a href="#" title="read more" class="btn alignleft">read more</a>
					<div class="clear"></div>
				</div>
				<div class="column">
					<h2 class="icon graph">Easy to Customize</h2>
					<p>
						Donec accumsan malesuada orcidonec sitmet<br>eros lorem isum dolor amet incon. Adipiscing elit maurise pharetra magna accumsan. Malesuada orcdonec umet lorem doloronsec.
					</p>
					<a href="#" title="read more" class="btn alignleft">read more</a>
					<div class="clear"></div>
				</div>
				<div class="column">
					<h2 class="icon book">Full Documentation</h2>
					<p>
						Donec accumsan malesuada orcidonec sitmet<br>eros lorem isum dolor amet incon. Adipiscing elit maurise pharetra magna accumsan. Malesuada orcdonec umet lorem doloronsec.
					</p>
					<a href="#" title="read more" class="btn alignleft">read more</a>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
			</div>
			<div class="hr"></div>
			<div class="columns2">
				<div class="column">
					<h2>Unlimited Possibilities</h2>
					<p class="dropcap-type1">A Nulla eget erat eget nibh accumsan rutrum eget sit amet arcu. Aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean tincint tristique mi, vitae vulputate elit aliquet at praesent in.</p>
					<a href="#" title="read more" class="btn alignleft">read more</a>
					<div class="clear"></div>
				</div>
				<div class="column">
					<h2>Clean and Beautiful</h2>
					<p class="dropcap-type2">B Nulla eget erat eget nibh accumsan rutrum eget sit amet arcu. Aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean tincint tristique mi, vitae vulputate elit aliquet at praesent in.</p>
					<a href="#" title="read more" class="btn alignleft">read more</a>
					<div class="clear"></div>
				</div>
				<div class="column">
					<h2>Professional Services</h2>
					<p class="dropcap-type3">C Nulla eget erat eget nibh accumsan rutrum eget sit amet arcu. Aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean tincint tristique mi, vitae vulputate elit aliquet at praesent in.</p>
					<a href="#" title="read more" class="btn alignleft">read more</a>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
			</div>
		</div>
	</div>
	<!-- End Content Wrapper -->

	<!-- Start Featured Bottom Line -->
	<div class="featured_bottom_line_full">
		<div id="featured_bottom_line">
			<div id="slider-code">
				<a class="buttons prev" href="#">left</a>
				<div class="viewport">
					<ul class="overview">
									<?php
									foreach ( $galeria as $item ) {
										?>
						<li>
							<!-- <a href="portfolio_single.html"></a> --> <img src="admin/<?php echo $item->Archivo ?>" width="200" height="140" alt="" />
							<h4><?php echo $item->Nombre?>
								<!-- <a href="portfolio_single.html"></a> -->
							</h4>
						</li>
							<?php } ?>
					</ul>
				</div>
				<a class="buttons next" href="#">right</a>
			</div>

			<div class="clear"></div>
		</div>
	</div>
	<!-- End Featured Bottom Line -->

	<?php include 'footer.php';?>

	<!-- Theme Hook -->
	<script type="text/javascript" src="js/Includer.js"></script>
	<script type="text/javascript">Cufon.now();</script>
</body>
</html>